#include "ScreenResolution.h"
#include <stdio.h>

ScreenResolution* ScreenResolution::s_instance = NULL;

ScreenResolution::ScreenResolution(void)
{
}

ScreenResolution::~ScreenResolution(void)
{
}

ScreenResolution* ScreenResolution::GetInstance()
{
	if (s_instance == NULL)
	{
		s_instance = new ScreenResolution();
	}

	return s_instance;
}

void ScreenResolution::Destroy()
{
	if (s_instance != NULL)
	{
		delete s_instance;
		s_instance = NULL;
	}
}

void ScreenResolution::Init(int width, int height)
{
	m_screenW = width;
	m_screenH = height;
}

int ScreenResolution::GetScreenWitdh()
{
	return m_screenW;
}

int ScreenResolution::GetScreenHeight()
{
	return m_screenH;
}

float ScreenResolution::GetScreenRatio()
{
	return (float) m_screenW / m_screenH;
}